import layout from '../layout'
import home from '../pages/home'
import list from '../pages/list'
import my from '../pages/my'
import type from '../pages/type'
import login from '../pages/login'
import detail from '../pages/detail'
const routes = [
    {
        from: '/',
        to: '/layout'
    },
    {
        path: "/layout",
        com: layout,
        children: [
            {
                from: "/layout",
                to: '/layout/home'
            },
            {
                path: "/layout/home",
                com: home
            },
            {
                path: "/layout/my",
                com: my,
                needLogin: true,
            },
            {
                path: "/layout/type",
                com: type
            }
        ]
    },
    {
        path: "/login",
        com: login
    },
    {
        path: "/detail/:id",
        com: detail
    },
    {
        path: "/list/:type",
        com: list
    }
]

export default routes;